import Router from 'koa-router';
import pack from './pack.js';
import login from './login.js';
import chat from './chat.js';
import continuation from './continuation.js';
import rewrite from './rewrite.js';
import check from './check.js';
import completion from './completion.js';
import upload from './upload.js';
import get_knowledge_base_files from './get_knowledge_base_files.js';
import knowledge_base_chat from './knowledge_base_chat.js';
import knowledge_base_search from './knowledge_base_search.js';
import get_knowledge_base_list from './get_knowledge_base_list.js'
import delete_knowledge_base from './delete_knowledge_base.js'
import create_knowledge_base from './create_knowledge_base.js'
import delete_knowledge_base_file from './delete_knowledge_base_file.js'

const router = new Router();

router.use('/api/pack', pack.routes(), pack.allowedMethods());
router.use('/api/login', login.routes(), login.allowedMethods());
router.use('/api/chat', chat.routes(), chat.allowedMethods());
router.use('/api/continuation', continuation.routes(), continuation.allowedMethods());
router.use('/api/rewrite', rewrite.routes(), rewrite.allowedMethods());
router.use('/api/check', check.routes(), check.allowedMethods());
router.use('/api/completion', completion.routes(), completion.allowedMethods());
router.use('/api/upload', upload.routes(), upload.allowedMethods());
router.use('/api/get_knowledge_base_files', get_knowledge_base_files.routes(), get_knowledge_base_files.allowedMethods());
router.use('/api/knowledge_base_chat', knowledge_base_chat.routes(), knowledge_base_chat.allowedMethods());
router.use('/api/knowledge_base_search', knowledge_base_search.routes(), knowledge_base_search.allowedMethods());
router.use('/api/get_knowledge_base_list', get_knowledge_base_list.routes(), get_knowledge_base_list.allowedMethods());
router.use('/api/delete_knowledge_base', delete_knowledge_base.routes(), delete_knowledge_base.allowedMethods());
router.use('/api/create_knowledge_base', create_knowledge_base.routes(), create_knowledge_base.allowedMethods());
router.use('/api/delete_knowledge_base_file', delete_knowledge_base_file.routes(), delete_knowledge_base_file.allowedMethods());

export default router;
